import { CreateDate, Entity, PrimaryUuid, UpdateDate, MemberId, Openid, Digdit, Remark, CreditType, WxCreditLogOperation, Money } from '@sker/core'
@Entity({ name: 'wx_credit_log' })
export class WxCreditLog {
    static title: string = `积分日志`;
    static resource: string = `wx_credit_log`;

    @PrimaryUuid({
        primaryKeyConstraintName: 'PK_WX_CREDIT_LOG_ID'
    })
    id!: string;

    @MemberId()
    member_id!: string;

    @Openid()
    openid!: string;

    @CreditType({comment: '类型'})
    type!: string;

    @WxCreditLogOperation({comment: '操作, 1=加 2=减'})
    operation!: string;

    @Digdit({comment: '变化前', default: 0})
    before!: number;

    @Digdit({comment: '变化后', default: 0})
    after!: number;

    @Remark()
    remark!: string;

    @CreateDate({
        comment: '创建日期'
    })
    create_date!: Date;

    @UpdateDate({
        comment: '更新日期'
    })
    update_date!: Date;
}